<?php
class FrontController {
	private static $instance;
	private $request;
	private $response;

	
	private function __construct() {
		$this->request = new RequestController();
		$this->response = new ResponseController();
	}
	
	public static function  getInstance() {
		if ( self::$instance == null ) {
			self::$instance = new self();
		}
		return self::$instance;
	}
	
	public function getRequest() {
		return $this->request;
	}

	private function setRequest(RequestController $request) {
		$this->request = $request;
	}

	public function getResponse() {
		return $this->response;
	}

	private function setResponse(ResponseController $response) {
		$this->response = $response;
	}

	public function dispatch() {
		$command = new SiageCommand();
		$command->execute($this->request, $this->response);
	}
	
	
}

?>